//
//  MSRoomTakeNoteCell.m
//  觅尚
//
//  Created by No.8 on 2019/5/15.
//  Copyright © 2019 No.8. All rights reserved.
//

#import "MSRoomTakeNoteCell.h"

@implementation MSRoomTakeNoteCell

+ (instancetype)cellWithTableView:(UITableView *)tableView{
    MSRoomTakeNoteCell * cell = [tableView dequeueReusableCellWithIdentifier:[MSRoomTakeNoteCell ID]];
    cell = [[MSRoomTakeNoteCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:[MSRoomTakeNoteCell ID]];
    cell.backgroundColor = [UIColor clearColor];
    return cell;
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self setMember];
        
    }
    return self;
}
- (void)setMember{
    
    /** 序号*/
    self.timeLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 40 * px, ScreenWidth / 3, 60 * px)];
    self.timeLabel.textColor = [UIColor whiteColor];
    self.timeLabel.text = @"";
    self.timeLabel.textAlignment = NSTextAlignmentCenter;
    self.timeLabel.font = [UIFont systemFontOfSize:SYRealValue(28  / 2)];
    [self addSubview:self.timeLabel];
    
    
    /** 序号*/
    self.roomNub = [[UILabel alloc] initWithFrame:CGRectMake(ScreenWidth / 3, self.timeLabel.y, self.timeLabel.width, self.timeLabel.height)];
    self.roomNub.textColor = [UIColor whiteColor];
    self.roomNub.text = @"";
    self.roomNub.textAlignment = NSTextAlignmentCenter;
    self.roomNub.font = [UIFont systemFontOfSize:SYRealValue(28  / 2)];
    [self addSubview:self.roomNub];
    
    self.OpenroomTime = [[UILabel alloc] initWithFrame:CGRectMake(ScreenWidth / 3 * 2, self.timeLabel.y, self.timeLabel.width, self.timeLabel.height)];
    self.OpenroomTime.textColor = [UIColor whiteColor];
    self.OpenroomTime.text = @"";
    self.OpenroomTime.textAlignment = NSTextAlignmentCenter;
    self.OpenroomTime.font = [UIFont systemFontOfSize:SYRealValue(28  / 2)];
    [self addSubview:self.OpenroomTime];
   
    
    
    /** 背景*/
    self.LinView = [[UIView alloc] initWithFrame:CGRectMake(0, 140 * px - 1, ScreenWidth, 1)];
    self.LinView.backgroundColor = BackViewColor;
    [self addSubview:self.LinView];
}

- (void)setRoomTakeModel:(MSRoomTakeModel *)RoomTakeModel{
    _RoomTakeModel = RoomTakeModel;
    
    self.timeLabel.text = [NSString stringWithFormat:@"%@",RoomTakeModel.opentime];
    
    self.roomNub.text = [NSString stringWithFormat:@"%@",RoomTakeModel.roomName];
    
    self.OpenroomTime.text = [NSString stringWithFormat:@"%@",RoomTakeModel.datetime];
}
+(NSString *)ID{
    return @"cell";
}

@end
